package com.accenture.portal.util;

import org.springframework.beans.propertyeditors.PropertiesEditor;

public class IntegerEditor extends PropertiesEditor {

	public void setAsText(String text) throws IllegalArgumentException {

		if (text == null || text.equals("")) {
			text = "0";
		}
		setValue(Integer.parseInt(text));
	}

	public String getAsText() {
		return getValue().toString();
	}

}